package cn.gson.school.entity.caiwu;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import cn.gson.school.entity.jiaoxue.ClassEntity;
import cn.gson.school.entity.jiaoxue.StudentEntity;
import cn.gson.school.entity.xitong.ImageEntity;
import cn.gson.school.entity.xitong.UserInfoEntity;

/**
 * 扶贫表
 * 
 * @author lc
 *
 */
@Entity
@Table(name = "tb_fupin")
public class FuPinEntity {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "fupin_id")
	private Long fuPinId;// 扶贫记录编号
	//==
	@OneToOne
	@JoinColumn(name = "apply_id")
	private FuPinApplyEntity fuPinApplyId;// 申请编号
	
	@OneToOne
	@JoinColumn(name = "studentinfo_id")
	private StudentEntity studentinfo;//学生编号
	
	@ManyToOne
	@JoinColumn(name = "class_id")
	private ClassEntity classId;//班级表
	
	@ManyToOne
	@JoinColumn(name = "userinfo_id")
	private UserInfoEntity userinfoId;// 操作人编号
	
	//添加了一个图片表外键
	@OneToOne
	@JoinColumn(name = "images_id")
	private ImageEntity imagesId;
	//==
	@Column(name = "fupin_reason")
	private String fuPinReason;// 扶贫原因

	@Column(name = "fupin_data")
	private String fuPinData;// 扶贫资料

	@Column(name = "fupin_prove")
	private String fuPinProve;// 扶贫证明

	@Column(name = "fupin_state")
	private String fuPinState;// 扶贫状态

	@Column(name = "add_plus")
	private String addPlus;// 备注

	public Long getFuPinId() {
		return fuPinId;
	}

	public void setFuPinId(Long fuPinId) {
		this.fuPinId = fuPinId;
	}

	public FuPinApplyEntity getFuPinApplyId() {
		return fuPinApplyId;
	}

	public void setFuPinApplyId(FuPinApplyEntity fuPinApplyId) {
		this.fuPinApplyId = fuPinApplyId;
	}

	public StudentEntity getStudentinfo() {
		return studentinfo;
	}

	public void setStudentinfo(StudentEntity studentinfo) {
		this.studentinfo = studentinfo;
	}

	public ClassEntity getClassId() {
		return classId;
	}

	public void setClassId(ClassEntity classId) {
		this.classId = classId;
	}

	public UserInfoEntity getUserinfoId() {
		return userinfoId;
	}

	public void setUserinfoId(UserInfoEntity userinfoId) {
		this.userinfoId = userinfoId;
	}

	public ImageEntity getImagesId() {
		return imagesId;
	}

	public void setImagesId(ImageEntity imagesId) {
		this.imagesId = imagesId;
	}

	public String getFuPinReason() {
		return fuPinReason;
	}

	public void setFuPinReason(String fuPinReason) {
		this.fuPinReason = fuPinReason;
	}

	public String getFuPinData() {
		return fuPinData;
	}

	public void setFuPinData(String fuPinData) {
		this.fuPinData = fuPinData;
	}

	public String getFuPinProve() {
		return fuPinProve;
	}

	public void setFuPinProve(String fuPinProve) {
		this.fuPinProve = fuPinProve;
	}

	public String getFuPinState() {
		return fuPinState;
	}

	public void setFuPinState(String fuPinState) {
		this.fuPinState = fuPinState;
	}

	public String getAddPlus() {
		return addPlus;
	}

	public void setAddPlus(String addPlus) {
		this.addPlus = addPlus;
	}

	@Override
	public String toString() {
		return "FuPinEntity [fuPinId=" + fuPinId + ", fuPinApplyId=" + fuPinApplyId + ", studentinfo=" + studentinfo
				+ ", classId=" + classId + ", userinfoId=" + userinfoId + ", imagesId=" + imagesId + ", fuPinReason="
				+ fuPinReason + ", fuPinData=" + fuPinData + ", fuPinProve=" + fuPinProve + ", fuPinState=" + fuPinState
				+ ", addPlus=" + addPlus + "]";
	}

	

}
